using System.Collections;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using TMPro;
using UnityEngine;

public class Test_LLMIPCaseDisplayer : MonoBehaviour
{
    public TextMeshProUGUI userInput;
    public TextMeshProUGUI llmResponse;
    [SerializeReference]
    public LLMInteractPairsBase pairBase;

    [Button]
    public async void Genarate()
    {
        userInput.text = pairBase.ToPrompt;
        llmResponse.text =await pairBase.Generate();
    }

    [Button]
    public void TakeSnap()
    {
        var clone = GameObject.Instantiate(gameObject);
        var save = "对话存档".GlobalUniqueGameObject();
        clone.transform.SetParent(save.transform, false);
        clone.name = pairBase.GetType().Name+$":{pairBase.interactContext}";
        clone.SetActive(false);
    }
}
